import React, {Component} from 'react'

function Wrap1 (Component, name) {
  class NewComponent extends Component {
    constructor () {
      super()
    }

    componentWillMount () {
      console.dir('wrap1')
    }

    render () {
      return <Component name={name}/>
    }
  }

  return NewComponent
}

function Wrap2 (Component, name) {
  class NewComponent extends Component {
    constructor () {
      super()
    }

    componentWillMount () {
      console.dir("wrap2")
    }

    render () {
      return <Component/>
    }
  }

  return NewComponent
}

export {
  Wrap1,
  Wrap2
}
